<?php
# 定义类

class Saler{
	// 构造方法

	/*public function __construct(){
		echo __CLASS__;
	}*/
	#属性
	public $count;
    private $money;
    #构造方法 ：初始化属性
    public function __construct($count,$money){
    	/*$this->count = 100;
        $this->money = 100;*/
    	 $this->count = $count;
        $this->money = $money;

    }
}
#实例化
/*$s = new Saler();
var_dump($s);*/
/*$s1 = new Saler(100,100);
$s2 = new Saler(1000,1000);
var_dump($s1,$s2);*/

$s = new Saler(200,300);# 系统在new Saler(100,100)好之后，会自动调用一次
$s->__construct(1000,2000);	# 允许手动调用;
var_dump($s);